#include "tdp2_ddsfile.hpp"

namespace TDP
{
	namespace Rendering
	{
		namespace DDSFile
		{
			const Format Format::RGBA8_k =
			{
				"RGBA8",

				// Stored as A8 R8 G8 B8
				0x00FF0000,
				0x0000FF00,
				0x000000FF,
				0xFF000000,

				4,
				true,
			};
			const Format Format::A8_k =
			{
				"A8",

				// Stored as A8
				0x00000000,
				0x00000000,
				0x00000000,
				0x000000FF,

				1,
				true,
			};
			const Format Format::RGBA5551_k =
			{
				"RGBA5551",

				// Stored as A1 R5 G5 B5
				0x00007C00,
				0x000003E0,
				0x0000001F,
				0x00008000,

				2,
				true,
			};
			const Format Format::RGBA4_k =
			{
				"RGBA4",

				// Stored as A4 R4 G4 B4
				0x00000F00,
				0x000000F0,
				0x0000000F,
				0x0000F000,

				2,
				true,
			};
			const Format Format::RGB8_k =
			{
				"RGB8",

				// Stored as R8 G8 B8
				0x00FF0000,
				0x0000FF00,
				0x000000FF,
				0x00000000,

				3,
				false,
			};
			const Format Format::RGB565_k =
			{
				"RGB565",

				// Stored as R5 G6 B5
				0x0000F800,
				0x000007E0,
				0x0000001F,
				0x00000000,

				2,
				false,
			};

			const Format *Format::FormatList_k[] =
			{
				&RGBA8_k,
				&RGBA5551_k,
				&RGBA4_k,
				&RGB8_k,
				&RGB565_k,
				&A8_k,
				NULL,
			};
		};
	};
};
